<template>
  <div>
    <div class="span-main">{{title}}</div>
    <div class="span-second">
      <span>FH:</span>
      <el-input-number 
        v-model="interval_num_FH"
        controls-position="right"
        size="medium"
        :disabled="isDisabled"
        :step="100"
        :min="0"
        :max="20000">
      </el-input-number>
    </div>
    <div class="span-second">
      <span>FC:</span>
      <el-input-number 
        v-model="interval_num_FC"
        controls-position="right"
        size="medium"
        :disabled="isDisabled"
        :step="100"
        :min="0"
        :max="10000">
      </el-input-number>
    </div>
    <div class="span-second">
      <span>MO:</span>
      <el-input-number 
        v-model="interval_num_MO"
        controls-position="right"
        size="medium"
        :disabled="isDisabled"
        :step="1"
        :min="0"
        :max="100">
      </el-input-number>
    </div>
  </div>
</template>

<script>
//import echarts from 'echarts'
export default {
  name: 'IntervalParam',
  props: {
    title: {
      type: String,
      default: "间隔参数"
    },
    isDisabled: {
      type: Boolean,
      default: false
    },
    num_FH:{
      type: Number,
      default: 1000
    },
    num_FC:{
      type: Number,
      default: 250
    },
    num_MO:{
      type: Number,
      default: 3
    }
    // x_data:{
    //   type: Array,
    //   default: () => []
    // },
  },
  data() {
    return {
      chart: null,
      interval_num_FH: this.num_FH,
      interval_num_FC: this.num_FC,
      interval_num_MO: this.num_MO
    }
  },
  watch:{
    // chartData: {
    //   deep: true,
    //   handler (val) {
    //     this.chart.setOption(val)
    //   }
    // }
  },
  mounted() {
    //this.initChart()
  },
  methods: {
    get_param(){
      return {FH: this.interval_num_FH, FC: this.interval_num_FC, MO: this.interval_num_MO}
      //this.$emit('getFunc', this.interval_num_FH, this.interval_num_FC, this.interval_num_MO)
    }
  }
}
</script>

<style scoped lang='scss'>
.span-second span{
  display: inline-block;
  width: 30px;
}
span{
  margin-top: 12px;
  margin-bottom: 3px;
}
.span-main{
  margin-top: 12px;
  margin-bottom: 3px;
}
.span-main:first-child{
  margin-bottom: 3px;
}
.el-input-number{
  width: 150px;
  margin-left: 0px;
}
</style>
